<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body>
        <script>
            let age = Number(window.prompt("请输入年龄"));
            let day = Number(window.prompt("请输入星期几"));
            if (age < 18 && day < 5 && day >= 1) {
                alert("上课");
            } else if/*如果上面条件不满足，这执行这个条件，条件满足后执行*/ (age >= 18 && age < 60 && day >= 1) {
                alert("逛街");
            } else if (age >= 60 && day >= 2) {
                alert("休息");
            }
        </script>
    </body>
</html>
